#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main() {
	int i, n;
	int arr1[3][3] = {};
	int arr1transpone[3][3] = {};
	int arr2[3][3] = {};
	for (i = 0 ; i < 3; i++) {
		for (n = 0; n < 3; n++) {
			scanf("%d", &arr1[i][n]);
		}
	}
	for (i = 0; i < 3; i++) {
		for (n = 0; n < 3; n++) {
			arr1transpone[n][i] = arr1[i][n];
		}
	}
	for (i = 0; i < 3; i++) {
		for (n = 0; n < 3; n++) {
			arr2[i][n]=arr1transpone[i][n]+arr1[i][n];
		}
	}
	for (i = 0; i < 3; i++) {
		for (n = 0; n < 3; n++) {
			printf("%d ", arr2[i][n]);
		}
		printf("\n");
	}
	return 0;
}